import request from '@/utils/request'

// 查询岗位列表
export function listPost(query) {
  return request({
    url: '/system/competition/list',
    method: 'get',
    params: query
  })
}
// 提交图片
export function uploadFile(data) {
  return request({
    url: '/system/competition/submitPic',
    method: 'post',
    data:data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  });
}
// 查找成员
export function searchUser(searchName) {
  return request({
    url: '/system/competition/searchUser/' + searchName,
    method: 'get',

  })
}
// 查询详细
export function getPost(postId) {
  return request({
    url: '/system/post/' + postId,
    method: 'get'
  })
}

// 新增
export function addPost(data) {
  return request({
    url: '/system/competition/add',
    method: 'post',
    data: data
  })
}

// 修改
export function updatePost(data) {
  return request({
    url: '/system/competition/list',
    method: 'put',
    data: data
  })
}

// 删除
export function delPost(game_id) {
  return request({
    url: '/system/competition/delete/' + game_id,
    method: 'delete'
  })
}
